﻿<UserControl x:Class="Sakura.Games.StgFramework.Builder.UI.DamageTypeItemEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
						 xmlns:my="clr-namespace:Sakura.Games.StgFramework.Builder.UI"
             mc:Ignorable="d"
            d:DesignWidth="600"  Loaded="UserControl_Loaded">

	<Grid>
		<!--<Grid Name="EditGrid">
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
				<ColumnDefinition Width="auto" />
			</Grid.ColumnDefinitions>
			<Grid Grid.Column="0" Name="EditInputPane">
				<Grid.RowDefinitions>
					<RowDefinition Height="auto" />
					<RowDefinition Height="auto" />
				</Grid.RowDefinitions>

				<TextBox Name="NameTextBox" Margin="3" Grid.Row="0" Text="{Binding Path=DataItem.Name, RelativeSource={RelativeSource FindAncestor, AncestorType=my:DamageTypeItemEditor}}" FontWeight="Bold" />
				<TextBox Name="DescTextBox" Margin="3" Grid.Row="1" Text="{Binding Path=DataItem.Description, RelativeSource={RelativeSource FindAncestor, AncestorType=my:DamageTypeItemEditor}}" TextWrapping="Wrap" MaxLines="5" MinLines="2" />
			</Grid>
			<StackPanel Grid.Column="1" Orientation="Vertical" Name="EditCommandPane">
				<Button Margin="3" Content="{StaticResource SaveItem}" Style="{StaticResource ImageItemButtonStyle}" Command="my:ActionCommands.Save" />
				<Button Margin="3" Content="{StaticResource CancelItem}" Style="{StaticResource ImageItemButtonStyle}" Command="my:ActionCommands.Cancel" />
			</StackPanel>
		</Grid>-->
		<Grid Name="ViewGrid" MouseEnter="ViewGrid_MouseEnter" MouseLeave="ViewGrid_MouseLeave" Background="Transparent">
			<Grid.RowDefinitions>
				<RowDefinition Height="auto" />
				<RowDefinition Height="auto" />
			</Grid.RowDefinitions>

			<TextBlock Margin="3" Grid.Row="0" Text="{Binding Path=DataItem.Name, RelativeSource={RelativeSource FindAncestor, AncestorType=my:DamageTypeItemEditor}}" FontWeight="Bold" />
			<TextBlock Margin="3" Grid.Row="1" Text="{Binding Path=DataItem.Description, RelativeSource={RelativeSource FindAncestor, AncestorType=my:DamageTypeItemEditor}}" TextWrapping="Wrap" />
			<StackPanel Grid.RowSpan="2" Name="ViewActioPanel" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="Hidden" Margin="3">
				<Button Style="{StaticResource ImageItemButtonStyle}" Content="{StaticResource EditItem}" Command="my:ActionCommands.Edit" CommandParameter="{Binding}" />
			</StackPanel>
		</Grid>
	</Grid>
	<UserControl.CommandBindings>
		<!--<CommandBinding Command="my:ActionCommands.Edit" CanExecute="OnEditCanExecute" Executed="OnEditExecuted" />
		<CommandBinding Command="my:ActionCommands.Save" CanExecute="OnSaveCanExecute" Executed="OnSaveExecuted" />
		<CommandBinding Command="my:ActionCommands.Cancel" CanExecute="OnCancelCanExecute" Executed="OnCancelExecuted" />-->
	</UserControl.CommandBindings>
</UserControl>
